import { BASE_TOKEN } from "./config"

export default class AxiosUtils {
    static instance = null
    constructor(instance) {
        this.instance = instance
        this.defaultToken()
    }

    defaultToken() {
        this.instance.interceptors.request.use(config => {
            if (BASE_TOKEN) {
                config.headers.token = `${BASE_TOKEN}`
            }

            return config
        })
    }
}